﻿#region Using directives

using System;
using System.Collections.Generic;
using System.Text;

using Weazel.Gezel.Model.Errors;

#endregion

namespace Weazel.Badger
{
  /// <summary>
  /// This class represent the result of a conversion.
  /// </summary>
  public class ConversionResult
  {
    /// <summary>
    /// Parse errors encounterede during parsing
    /// </summary>
    private List<ParseError> parseErrors = new List<ParseError>();
    public List<ParseError> ParseErrors
    {
      get
      {
        return parseErrors;
      }
    }

    /// <summary>
    /// Verification errors encountered 
    /// </summary>
    private List<VerificationError> verificationErrors = new List<VerificationError>();
    public List<VerificationError> VerificationErrors
    {
      get
      {
        return verificationErrors;
      }
    }

    /// <summary>
    /// List of errors encountered during conversion
    /// </summary>
    private List<ConversionError> conversionErrors = new List<ConversionError>();
    public List<ConversionError> ConversionErrors
    {
      get
      {
        return conversionErrors;
      }
    }    

    public int NumberOfErrors
    {
      get
      {
        return 
          parseErrors.Count + 
          verificationErrors.Count +
          conversionErrors.Count;
      }
    }

    public int NumberOfWarnings
    {
      get
      {
        return warnings.Count;
      }
    }

    private List<ConversionWarning> warnings = new List<ConversionWarning>();
    public List<ConversionWarning> Warnings
    {
      get
      {
        return warnings;
      }

      set
      {
        warnings = value;
      }
    }

    /// <summary>
    /// List of result VHDL files written 
    /// </summary>
    private List<string> filesWritten = new List<string>();
    public List<string> FilesWritten
    {
      get
      {
        return filesWritten;
      }
    }

    public ConversionResult()
    {
    }
  }
}
